package com.mylog;

import org.apache.log4j.Logger;

public class HelloLog {
	private static Logger logger =Logger.getLogger(HelloLog.class);
	//传当前类对象HelloLog4j.class
	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		System.out.println("This is println message");
		logger.debug("This is debug message");
		logger.info("This is info message");
		logger.error("This is error message");
		//级别高低: debug<info<error
		//显示级别可以在log4j.properties中设置
	}

}
